<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en"
      xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="UTF-8">
    <title>Register</title>
</head>
<script src="js/Verification.js"></script>
<script type="text/javascript"></script>
<body>
<h1>welcome</h1><a href="count">->>统计</a>

<form action="insert" method="post" onsubmit="return Verification(this)">

    <lable>姓名：</lable>
    <input type="text" name="name"/>
    <lable>类型：</lable>
    <select name="type">
        <option th:each="t:${types}" th:value="${t.type}" th:text="${t.type}"></option>
    </select>
    <label>数量：</label><input type="text" name="number" size="6" placeholder="数字"/>
    <label>日期：</label><input type="text" name="date" placeholder="格式：2018-8-21"/>
    <input type="submit" value="提交" />
</form>


<table cellspacing="10">
    <tr>------------------------------------------------------------------------------------------------------</tr>
    <tr th:each="i:${list}">

        <td th:text="'姓名：'+${i.name}+'     '"></td>

        <td th:text="'类型：'+${i.type}+'     '"></td>

        <td th:text="'数量：'+${i.number}+'     '"></td>

        <td th:text="'日期：'+${i.date}+'     '"></td>
    </tr>

    <tr th:each="j:${count}">
        <td th:text="'哪个人：'+${j.name}+'       '"></td>
        <td th:text="'啥子东西：'+${j.type}+'       '"></td>
        <td th:text="'用了好多：'+${j.number}+'       '"></td>
    </tr>
</table>
<h6>-------------------------此处查看仓库物品及其数量----------------------------------------</h6>
<a href="show">仓库</a>
<table>
    <tr th:each="f:${show}">
        <td th:text="'ID:'+${f.id}+'      '"></td>
        <td th:text="'类型:'+${f.type}+'      '"></td>
        <td th:text="'数量:'+${f.numbers}+'      '"></td>
    </tr>
</table>


<h6>--------------------此处添加(修改)物品及其数量(若执行此步骤请先完成上一步↑↑↑↑，避免id重复)---------------------------</h6>
<form action="inserts" method="post" onsubmit="return Verification1(this)">
    <lable>ID：</lable>
    <input type="text" name="id" placeholder="更新必填,新加物品可省略"/>
    <lable>类型：</lable>
    <input type="text" name="type" placeholder="鼠标电脑啥的"/>
    <lable>数量：</lable>
    <input type="text" name="numbers" placeholder="总数，要添多少"/>
    <input type="submit" value="上传"/>
</form>

<script type="text/javascript"></script>
</body>
</html>